<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
	<title>CSS 3D转换</title>
    <script src="./prefixfree.js"></script>
	<style>
		body {
			margin: 0;
			padding: 0;
			background-color: #F7F7F7;
		}
		.box {
			display: inline-block;
			width: 150px;
			height: 150px;
			background-color: lightblue;
		}

		.rotateX {
			height: 150px;
			padding-top: 50px;
			text-align: center;
		}
		
		.rotateX .box {
			transition: all 5s;
		}
		
		.rotateX:hover .box {
			transform: perspective(100px) rotateX(-90deg);
		}

		.rotateY {
			height: 150px;
			padding-top: 50px;
			text-align: center;
		}
		
		.rotateY .box {
			transition: all 2s;
		}
		
		.rotateY:hover .box {
			transform: perspective(200px) rotateY(-180deg);
		}

		.rotateZ {
			height: 150px;
			padding-top: 50px;
			text-align: center;
		}
		
		.rotateZ .box {
			transition: all 2s;
		}
		
		.rotateZ:hover .box {
			transform: perspective(100px) rotateZ(-180deg);
		}
	</style>
</head>

<body>
	<div class="rotateX">
		<div class="box">rotateX</div>
	</div>
	<div class="rotateY">
		<div class="box">rotateY</div>
	</div>
	<div class="rotateZ">
		<div class="box">rotateZ</div>
	</div>
</body>

</html>